<?php

namespace App\Api\Requests;

use Illuminate\Foundation\Http\FormRequest;

class ProductAuthRequest extends BaseRequest
{
    /**
     * 确定是否授权用户发出此请求
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }
    /**
     * 获取应用于该请求的验证规则。
     *
     * @return array
     */
    public function rules()
    {
        return [
            'name' => ['required','max:255'],
            'price' => ['required','integer'],
            'quantity' => ['required','integer'],
        ];
    }

}
